package utils

import scala.collection.immutable.SeqMap
import implicits.Implicits._

/** Created by yz on 9/5/2024
  */
case class LineMapNoLowerData(maps: List[SeqMap[String, String]], headers: List[String]) {

  def filter(f: SeqMap[String, String] => Boolean) = {
    val newMaps = maps.filter(f)
    LineMapNoLowerData(newMaps, headers)
  }

  def csvLines = {
    if (maps.nonEmpty) {
      maps.csvLines
    } else List(headers)
  }

}
